package mercurius.fitness.client.rb.measurement.forms;

import com.google.gwt.user.client.rpc.AsyncCallback;

import mercurius.fitness.client.locale.Locale;
import mercurius.fitness.client.rb.measurement.Measurements;
import mercurius.fitness.client.rb.measurement.MeasurementsRB;
import net.pleso.framework.client.bl.forms.IEditForm;
import net.pleso.framework.client.bl.forms.items.IFormItemsGroup;
import net.pleso.framework.client.dal.IDataRow;

public class EditMeasurementsForm extends MeasurementsForm implements IEditForm {

	private Integer id = null;
	
	public EditMeasurementsForm(Integer id) {
			this.id = id;
	}
	
	public void updateRow(IDataRow row, AsyncCallback callback) {
		MeasurementsRB.getDataSet().update((Measurements) row, callback); 
	}

	public void GetData(AsyncCallback callback) {
		MeasurementsRB.getDataSet().get(this.id, callback);
	}

	public String getCaption() {
		return Locale.constants().edit_measurement_caption();
	}

	public IFormItemsGroup[] getGroups() {
		return groups;
	}
}
